﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using FingerPrintRecognizer.Common;

namespace FPRAdminClient
{
    public partial class Main : Form
    {
        public Main()
        {
            InitializeComponent();
        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AboutFingerPrint about = new AboutFingerPrint();
            about.Show();
        }

        private void Main_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void SaveButton_Click(object sender, EventArgs e)
        {
            Person p = new Person();
            p.NationalID = this.NationalID.Text;
            p.Title = this.title.Text;
            p.FirstName  = this.Fname.Text;
            p.LastName = this.Lname.Text;
            p.DateOfBirth = DateTime.Parse(this.DOB.Text);
            p.Address = this.PersonAddress.Text;
            p.City = this.PersonCity.Text;
            p.Country = this.PersonCountry.Text;

            FPRecognizerServiceClient client = new FPRecognizerServiceClient();
            client.savePerson("dummy", p);
        }

        private void ListPersons_Click(object sender, EventArgs e)
        {

        }


    }
}
